var fs=require("fs");
var person={};
var count=0;

//show 方法一
function show()
{
	count++;
	if(count==2)
	{
		console.log(person);
	}
}
//show 方法二
function show1()
{
	if(Object.keys(person).length==2)
	{
		console.log(person);
	}
	Object.keys(person).forEach(function(item){
		console.log(item);
	});
}

fs.readFile("./name.txt","utf8",function(err,name){
	person.name=name;
	show1();
});
fs.readFile("./age.txt","utf8",function(err,age){
	person.age=age;
	show1();
});